home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / gui140.zip / GUIDEMO.BAS < prev    next >
BASIC Source File  |  1997-06-28  |  2KB  |  59 lines

  1. 'GUI Library Demo Program
  2. 'For GUI Library v. 1.40
  3. 'Copyright (c) 1997 by Tika Carr
  4. 'May 5, 1997
  5.  
  6. '$INCLUDE: 'gui.bi'
  7.  
  8. clrscrn 8       'Grey screen
  9. mouse "init"
  10.  
  11. '** Title Bar
  12. 'TitleBar "text", barcolor, textcolor
  13. TitleBar "GUI Library Demo", 12, 15
  14.  
  15. '** Information Screen
  16. drwbtn 4, 9, 4, 7, 0, 25, 639, 479    'Fill rest of screen
  17. 'Each line of text is 16 pixels from the previous line of text
  18. gprint "This is a demonstration of what my GUI library can do.", 10, 32, 14
  19. gprint "Click on various things to see what happens!", 10, 48, 14
  20. mouse "show"
  21.  
  22. '** Underlying Text to show screen preservation
  23. gprint "Watch This Space!", 200, 200, 10
  24.  
  25. '** Define a couple of buttons
  26. AB$ = button$(3, 3, "About", 3, 14, 15, 1, 1)   'About button
  27. EB$ = button$(64, 3, "Exit", 8, 10, 15, 2, 1)   'Exit button
  28.  
  29. '** Main loop (do mouse, etc.)
  30. DO
  31.         mouse "get"
  32.         IF mb = 1 THEN
  33.                 about = pushbtn%(AB$)   'About button pushed?
  34.                 IF about = 1 THEN
  35.                         about = 0
  36.                         REDIM a$(1 TO 8)
  37.                         a$(1) = "       GUI Library"
  38.                         a$(2) = "Copyright 1996 by Tika Carr."
  39.                         a$(4) = " Contributing Programmers:"
  40.                         a$(5) = "Douglas Lusher: gprint routine"
  41.                         a$(7) = "Many thanks to the folks"
  42.                         a$(8) = "in the QUIK_BAS FidoNet Echo."
  43.                         PopUpBox 170, 150, 15, 13, 1, a$()
  44.                 END IF
  45.                 ex = pushbtn%(EB$)    'Exit button pushed?
  46.                 IF ex = 1 THEN
  47.                         ex = 0
  48. 'PopInp$ prompt,input limit,x,y,BoxColor,TextColor,FieldColor,FieldTextColor,
  49. '        CursorColor
  50.                         p$ = "Do you want to quit? (y/n)"
  51.                         a$ = PopInp$(p$, 1, 200, 200, 1, 11, 15, 1, 9)
  52.                         IF LCASE$(a$) = "y" THEN EXIT DO
  53.                 END IF
  54.         END IF
  55. LOOP
  56. SCREEN 0, 0, 0, 0: COLOR 7, 0: CLS : END
  57.  
  58.  
  59.